package com.demo;

import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.session.Configuration;
import org.noear.solon.SolonBuilder;

@Slf4j
public class Application {


    public static void main(String[] args) {    //这是程序入口
        new SolonBuilder()
                .onEvent(Configuration.class, e -> {

                    log.info("-----init mybatis");
                    MybatisPlusInterceptor plusInterceptor = new MybatisPlusInterceptor();

                    e.addInterceptor(plusInterceptor);


                })
                .onError(e -> {
                    log.error("", e);
                })
                .start(Application.class, args, (app) -> {
                    //app.beanMake(MybatisConfiguration.class);

                });
    }


}